/*
 * Funny Language - a free style programming language.
 * Copyright (C) 2015 by fanguangping (fanguangping@163.com)
 * list.h
 */

#ifndef LIST_H_
#define LIST_H_

#include "../basic/ds.h"

DEFINE_OPERATOR( reverse     );
DEFINE_OPERATOR( list_star   );
DEFINE_OPERATOR( append      );
DEFINE_OPERATOR( list_length );
DEFINE_OPERATOR( assq        );
INIT_OPERATORS( list );

Cell* reverse(Scheme *sc, Cell* old_list);
Cell* list_star(Scheme *sc, Cell* old_list);
Cell* revappend(Scheme *sc, Cell* acc, Cell* list);
int ls_length(Scheme *sc, Cell* a);
int is_list(Scheme *sc, Cell* a);

#endif /* LIST_H_ */
